Page({
  //下拉关闭
  onPullDownRefresh (){
    wx.stopPullDownRefresh({
      success: (res) => {
      },
    })
  },
  data: {
      current: [
        {
        poster: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000',
        name: '此时此刻',
        author: '许巍',
      },
      {
        poster: 'https://y.gtimg.cn/music/photo_new/T002R300x300M000000YDaGU14nVNs.jpg?max_age=2592000',
        name: '雀跃',
        author: '任然',
      },
      {
        poster: 'https://img6.km.com/dianyingimg/posterImg/dy/other/6/e7b14163b75ea560caff3531ea9efe14.jpg',
        name: '伯虎说',
        author: '平生不晚',
      },
    ],
      audioAction: {
        method: 'pause'
      },
      inputShowed: false,
      inputVal: "",
      background: [
        'http://p1.music.126.net/prXC1FRx_pMkw8ClWxx7BQ==/109951165971558584.jpg?imageView&quality=89', 
        'http://p1.music.126.net/TSPMYsaeozIQSKLlB1NnIg==/109951165971598438.jpg?imageView&quality=89',
        'http://p1.music.126.net/y5hZTVosckiaPVu2bk9jSg==/109951165972280873.jpg?imageView&quality=89',
        'http://p1.music.126.net/6GehUqqQUNv716jOleal5g==/109951165971543864.jpg?imageView&quality=89',
        'http://p1.music.126.net/b3m8qVYVOcHpaC6qiWRPsw==/109951165971576760.jpg?imageView&quality=89',
        'http://p1.music.126.net/RAb0LmbKSw8pqUO5DT6I8A==/109951165971622143.jpg?imageView&quality=89'
      ],
      indicatorDots: true,
      vertical: false,
      autoplay: true,
      interval: 2000,
      duration: 800,
      gedan: [
        {src:'http://p1.music.126.net/8gx1rLiemXwoKE6fKyq8PA==/109951165291292392.jpg?imageView=1&type=webp&thumbnail=370x0',te:'「华语流行」每想起旧爱，心里就响起一首歌'},
        {src:'http://p1.music.126.net/zyiAnTJpsfHPSPVCVPXSEA==/109951165764984626.jpg?imageView=1&type=webp&thumbnail=370x0',te:'催泪：遗憾吗，我们就此错过了'},
        {src:'https://qpic.y.qq.com/music_cover/hM8vB7HVYxzhfT7dUzmSPgYnkg4GEj4a9FdqEhCVUSp7qibJicldliaYw/300?n=1',te:'我想你了 其实我也很脆弱'},
        {src: 'https://qpic.y.qq.com/music_cover/smA6N8sZuWZNuzE8os9a9ueXWJpV4hzZVAP3sEfcefgNPiaSUjmXX4g/300?n=1',te:'「网易云音乐最热个性推荐总结'},
        {src: 'http://p1.music.126.net/THc2dGCHBcMLuRlwQjccFg==/109951165210824295.jpg?imageView=1&type=webp&thumbnail=370x0',te:'留给我们的夏天，大概还有一首歌那么长'},
        {src: 'http://p1.music.126.net/5ZGoG1vfDhp87eDdMgnIyg==/109951165827587074.jpg?imageView=1&type=webp&thumbnail=370x0',te:'还好大雾四起 藏匿难言爱意'}
      ]
  },
  onLoad() {
      this.setData({
          search: this.search.bind(this)
      })
  },
  gengduo(e) {
    wx.switchTab({
      url: e.currentTarget.dataset.url,
    })
  },
  onShareAppMessage() {
    return {
      title: 'swiper',
      path: 'page/component/pages/swiper/swiper'
    }
  },
  search: function (value) {
      return new Promise((resolve, reject) => {
          setTimeout(() => {
              resolve([{text: '搜索结果', value: 1}, {text: '搜索结果2', value: 2}])
          }, 200)
      })
  },
  selectResult: function (e) {
  },
  audioPlayed: function (e) {
  },
  audioTimeUpdated: function (e) {
    this.duration = e.detail.duration;
  }
});
